package booroo.basic;

public class J15_Printer {
	public static void main(String[] args) {
		Printer p01 = new Printer();
		p01.Print();
		InkJetPrinter p02 = new InkJetPrinter();
		p02.Print();
		LaserPrinter p03 = new LaserPrinter();
		p03.Print();
		
		System.out.println();
		p01.Print();
		p02.Print();
		p03.Print();
		
		
	} // main
} // class

// 부모 클래스
class Printer{
	public String model;
	public String maker;
	public String type;
	public int papers;
	public int remain;
	
	public void Print(){
		System.out.println("프린터입니다!");
		++papers;
		System.out.println("인쇄매수 :" + papers);
		}
}
interface print{}

// 자식 클래스
class InkJetPrinter extends Printer{
	public int inkRemain;
	@Override
	public void Print() {
		System.out.println("잉크젯프린터입니다!");
		++papers;
		System.out.println("인쇄매수 :" + papers);
		}
}

class LaserPrinter extends Printer{
	public int tonerRemain;
	@Override
	public void Print() {
		System.out.println("레이저프린터입니다!");
		++papers;
		System.out.println("인쇄매수 :" + papers);
		}
}